package com.zm.Study03_FileInAndOutputTest;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class ImageReadAndWrite {
    public static void main(String[] args) throws IOException {
        FileInputStream fis=new FileInputStream("D:\\project\\IDEAPROJECT\\JavaIO\\src\\main\\resources\\static\\test\\imgRead.png");
        FileOutputStream fos=new FileOutputStream("D:\\project\\IDEAPROJECT\\JavaIO\\src\\main\\resources\\static\\test\\imgWrite.png");
        int by;
        while ((by=fis.read())!=-1){
            fos.write(by);
        }
        fis.close();
        fos.close();
    }
}
